class A(object):
    "override __str__ and __repr__ to output instance of class A friendly"
    def __init__(self,name,age):
        self.name = name
        self.age = age

    def __str__(self):
        return self.name+":"+str(self.age)

    def __repr__(self):
        return self.name+"#"+str(self.age)

if __name__ == '__main__':
    a = A("lk",22)
    print a                    #call a.__str__()
    print repr(a)                          #call a.__repr__()
